-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add birdeye plugin #1417
base: develop
Are you sure you want to change the base?
feat: add birdeye plugin #1417
Conversation
I'd love to get input from the team if perhaps these should be actions instead of provider data. |
Actions are like answers to questions/queries providers inject information in all prompts (like making the bot aware of the time) that’s my current understanding. You may want both |
So; tests are all passing, but when I run this locally, I can't get any plugins to work when added to the characterfile array. This issue also occurs on main, so it's probably not an issue with the plugin -- that said, don't want to merge if I can't get it running locally, will leave it for someone else. code looks fine when eyeballing |
I am going to rebase this to work better with the newly merged MR: #1366 I am also going to convert some of these providers to actions and do more testing and validation |
time_from: startTime.toString(), | ||
time_to: endTime.toString(), | ||
}); | ||
const url = `${BASE_URL}/defi/price_history_unix?${params.toString()}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ℹ INFORMATIONS
Fetching price history for token 0x0b3e328455c4059eeb9e3f84b5543f74e24e7e1b from 11/27/2024, 8:08:14 PM to 12/27/2024, 8:08:14 PM on base with 1 day interval from:
https://public-api.birdeye.so/defi/price_history_unix?address=0x0b3e328455c4059eeb9e3f84b5543f74e24e7e1b&time_from=1732766894&time_to=1735358894&interval=1d
⛔ ERRORS
API Error (404):
Resource not found
⛔ ERRORS
Error fetching price history:
Resource not found
The correct endpoint should be defi/historical_price_unix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually this endpoint doesn't seem to support the evm chains yet.
{
"success": false,
"message": "Chain ethereum is not supported yet"
}
address: contractAddress, | ||
interval: interval.toLowerCase(), | ||
limit: "24", // Get last 24 periods | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These don't appear to be the correct params for this endpoint.
The required params for v1 are:
- address
- type
- time_from
- time_to
According to the documentation. I tested and verified in my branch.
// Get current unix time and 24h ago
const endUnixTime = Math.floor(Date.now() / 1000);
const startUnixTime = endUnixTime - (60 * 60 * 24); // 24 hours ago
const params = new URLSearchParams({
address: contractAddress,
// interval: interval.toLowerCase(),
type: "1D", // Get last 24 periods
time_from: startUnixTime.toString(),
time_to: endUnixTime.toString(),
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @camharris . I have several big changes coming soon that will address this. Thanks for your review I appreciate it.
This is my first attempt to contribute to this project. I have been adding features and additional query capability for the Birdeye API and I think many other could benefit.
Relates to:
Risks
Background
This pull request significantly enhances the Birdeye API integration within the AI agent framework by expanding its capabilities beyond basic query functionality. The proposed tools enable more comprehensive and versatile interactions with the Birdeye API, including data clearing and management features. These improvements provide the AI agents with a broader and more efficient toolkit for handling Birdeye API data, enhancing the overall flexibility and utility of the framework for developers and end-users. By extending the scope of the API integration, this contribution supports more robust and scalable solutions within the project.
What does this PR do?
This PR adds providers that represent all the different API endpoints available in the Birdeye API. By doing so, it ensures that when a user requests a specific type of data, the AI agent has a significantly higher likelihood of accessing and utilizing the relevant data in its response. This enhancement maximizes the agent’s ability to provide accurate and contextually rich answers, leveraging the full scope of the Birdeye API.
What kind of change is this?
This API connection is critical for enabling the agent to perform research and analyze the dynamics of the ecosystem effectively. By integrating comprehensive access to all Birdeye API endpoints, this PR lays the groundwork for future enhancements and features that will further expand the agent's capabilities. This integration not only empowers the agent to deliver more insightful and accurate responses but also positions the framework for scalable growth and the addition of advanced functionalities in the future.
Documentation changes needed?
Testing
Where should a reviewer start?
-- give me a list of wallets on solana that i should be following
-- tell me more about BbJgE7HZMaDp5NTYvRh5jZSkQPVDTU8ubPFtpogUkEj4
-- what are the top gainers today
-- what is the current price of HIPPO?
-- what tokens are tredning today on sui?